import React from 'react'
import Mock from 'mockjs'
import './App1.css'
import ListItem from './components/listItem/listItem'
const data = Mock.mock({
  "list|10": [{
    "id": "@id",
    "title": "@ctitle",
    "image": "@image(120x80, @color, @cname)",
    "desc": "@cword(10, 20)"
  }]
})



class App1 extends React.Component {
  state = {
    list: data.list
  }
  render() {
    const { list } = this.state
    console.log(list)
    return (
      <div>
          {
            list.map(v => {
              return <ListItem key={v.id} v={v}></ListItem>
            })
          }
      </div>
    )
  }
}

export default App1